<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class AddIndexVersionCheckListInVersionCheckListTable extends AbstractMigration
{
    public function up()
    {
        $this->table('version_check_list')
            ->addIndex(['version_id'], ['name' => 'idx_version_id', 'type' => 'normal'])
            ->addIndex(['check_list_id'], ['name' => 'idx_check_list_id', 'type' => 'normal'])
            ->save();
    }

    public function down()
    {
        $this->table('version_check_list')
            ->removeIndexByName('idx_version_id')
            ->removeIndexByName('idx_check_list_id')
            ->save();
    }
}
